{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime\n",
    "\n",
    "class Diary():\n",
    "    def __init__(self, birthday, christmas):\n",
    "        self.birthday = birthday\n",
    "        self.christmas = christmas\n",
    "    \n",
    "    def show_birthday(self):\n",
    "        return self.birthday.strftime('%d-%b-%y')\n",
    "\n",
    "    def show_christmas(self):\n",
    "        return self.christmas.strftime('%d-%b-%y')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'14-May-20'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "my_diary = Diary(datetime.date(2020, 5, 14), datetime.date(2020, 12, 25))\n",
    "my_diary.show_birthday()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Diary():\n",
    "    def __init__(self, birthday, christmas):\n",
    "        self.birthday = birthday\n",
    "        self.christmas = christmas\n",
    "    \n",
    "    @staticmethod\n",
    "    def format_date(date):\n",
    "        return date.strftime('%d-%b-%y')\n",
    "    \n",
    "    def show_birthday(self):\n",
    "        return self.format_date(self.birthday)\n",
    "\n",
    "    def show_christmas(self):\n",
    "        return self.format_date(self.christmas)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
